import { BabylonContainer } from 'babylon-lib/base/babylon-container';
import { Engine, BufferLoad, Stage, IContainerOptions } from 'babylon-lib/index';
import { DefaultStage } from './stage/default-stage';


export default class AppContainer extends BabylonContainer {

    protected options(): IContainerOptions {
        return {
            adaptToDeviceRatio:true,
            useRightHand:true,
            engineOptions:{
                limitDeviceRatio:1.5,
                preserveDrawingBuffer:false
            }
        };
    }

    protected loadingUI(): HTMLElement | null {
        return document.createElement('div');
    }

    protected initializeStages(engine: Engine, canvas: HTMLCanvasElement, bufferLoader: BufferLoad): Array<Stage> {
        const stage = new DefaultStage(engine, canvas, bufferLoader);
        return [stage];
    }

}


export { AppContainer };